import { PageContainer } from '@ant-design/pro-layout';
import { Modal,Input, Tabs } from 'antd';
import React from 'react';

import ApplyedRecord from './ApplyedRecord';
import CanApply from './CanApply';
const {TextArea} = Input
const {confirm} = Modal
class index extends React.Component {
    constructor(props) {
        super(props);
        this.state = { 
            userInfo:JSON.parse(sessionStorage.getItem("userInfo")),
            freshen:false,
            tabKey:'1'
         };
    }
    tabChange=(e)=>{
        this.setState({
            tabKey:e
        })
    }
    render() {
        let {tabKey} = this.state
        return (
            <PageContainer>
                <Tabs centered onChange={this.tabChange}>
                    <Tabs.TabPane tab="可领取的任务" key='1'>
                        {tabKey==='1'&&<CanApply/>}
                    </Tabs.TabPane>
                    <Tabs.TabPane tab="已领取的任务" key='2' >
                        {tabKey==='2'&&<ApplyedRecord/>}
                    </Tabs.TabPane>
                </Tabs>
            </PageContainer>
        );
    }
}

export default index;